#include<bits/stdc++.h>
using namespace std;

int n, a, ans;
map<int, int> mp;

struct node{
    node *next;
    int num;
};
node *head, *tail, *p, *nw;

void make_list()
{
    head = new node;
    p = head;
    for(auto i : mp)
    {
        nw = new node;
        nw -> num = i.second;
        p -> next = nw;
        p = nw;
    }
    tail = new node;
    p -> next = tail;
}

void solve()
{
    while(head -> next != tail)
    {
        p = head, nw = head -> next;
        while(nw != tail)
        {
            nw -> num--;
            if(!(nw -> num))
            {
                p -> next = nw -> next;
                nw = p -> next;
            }
            else
            {
                p = nw;
                nw = nw -> next;
            }
        }
        ans++;
    }
    printf("%d", ans);
}

int main()
{
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    scanf("%d", &n);
    for(int i = 1; i <= n; i++)
    {
        scanf("%d", &a);
        mp[a]++;
    }
    make_list();
    solve();
    return 0;
}
